Repository navigation
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1405 +/- ##
==========================================
Coverage 85.58% 85.58%
Complexity 5087 5087
==========================================
Files 193 193
Lines 18409 18409
==========================================
Hits 15755 15755
Misses 2654 2654
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What?
Closes #1404
An accepted type-ahead suggestion no longer starts with a space after Japanese, Chinese, Thai and other text written without spaces between words.
Why?
The ability trims each suggestion, and
addLeadingSpaceIfNeeded()adds a space back whenever the character before the caret is not whitespace. In languages that do not put spaces between words, every accepted suggestion got a stray space (今日は天気が いいですね。), and it was saved with the post.How?
addLeadingSpaceIfNeeded()skips the space when the last character before the caret and the first character of the suggestion are both from a script written without spaces (Han, Hiragana, Katakana, Thai, Lao, Khmer, Myanmar) or are full-width punctuation such as。and,.今日は天気がいいですね。. Ondevelopit fails with今日は天気が いいですね。.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code and Codex
Used for: Investigation, code, tests, local testing and PR wording. I reviewed the reasoning, the code and the test results, and I take responsibility for the contribution.
Testing Instructions
今日は天気が, leave the caret at the end and press Tab when the suggestion shows.我今天去(Chinese) andวันนี้อากาศ(Thai) too.The weather is) the suggestion still gets its space.Screenshots or screencast
Six paragraphs after accepting a suggestion with Tab, then saving. Red marks the added space.
Changelog Entry